package com.example.statistics.bean

import com.bin.david.form.annotation.SmartColumn
import com.bin.david.form.annotation.SmartTable
import com.example.statistics.ex.IDialogModel
import java.io.Serializable


data class PurchaseProductBean(
    var ID: Int = 0,
    var date: String,
    var agentId: Int = 0,
    var agent: String,
    var productId: Int = 0,
    var factoryNo: String,
    var productName: String,
    var agentContainerNo: String,
    var containerNo: String,
    var contractNo: String,
    var futuresSpot: String,
    var productPrice: Double,
    var priceUnit: String,
    var productWeight: Double,
    var weightUnit: String,
    var productNumber: Int,
    var inventoryNumber: Int,
    var inventoryWeight: Double,
    var specification: String,
    var productTotalPrice: Double, //商品总价
    var settlementTotalAmount: Double, //结算总金额
    var billTotalAmount: Double, //账单总金额
    var salesTotalAmount: Double,
    var folder: String? = null,
    var flowCity: String? = "",
    var profit: Double,
    var salesCustomer: String?,
    var salesPrice: Double,
    var feeDifference: Double,
    var remark: String?,
    var taxFee: TaxFeeBean?,
    var financingFeeList: List<FinancingFeeBean>?,
    var futuresFeeList: List<FuturesFeeBean>?,
    var clearanceFeeList: List<ClearanceBean>?,
    var settlementFeeList: List<SettlementFeeBean>?,
    var storageFeeList: List<StorageBean>?,
    var fileList: List<FilesBean>?,
    var purchaseSalesList: List<ShipmentBean>?,
    var shippingInfo: ShippingInfo?, //港口基本信息
    var startDate: String,
    var warehousingDate: String?,
    var arrivalDate: String?,
    var deliveryDate: String?
) : Serializable

data class StorageBean(
    var ID: Int,
    var containerNo: String,
    var weight: Double,
    var startDate: String,
    var endDate: String,
    var storage: String,
    var unitPrice: Double,
    var storageDays: Int,
    var storageFee: Double
) : Serializable

data class ColdStorageBean(
    var id: Int,
    var city: String,
    var storage: String,
    var agent: String,
    var price: Double,
    var position: String,
    var lat: Double,
    var lon: Double
) : IDialogModel, Serializable {
    override val itemName: String
        get() = storage
}

/**
 * 定金、尾款费用
 */
@SmartTable
data class FuturesFeeBean(
    var ID: Int,
    var purchaseProductId: Int,
    @SmartColumn(id = 1, name = "类型")
    var feeType: String,
    @SmartColumn(id = 2, name = "日期")
    var date: String,
    @SmartColumn(id = 3, name = "美元")
    var dollar: Double,
    @SmartColumn(id = 4, name = "汇率")
    var exchangeRate: Double,
    @SmartColumn(id = 5, name = "人民币")
    var rmb: Double = 0.0,
    @SmartColumn(id = 6, name = "手续费")
    var handlingFee: Double = 0.0,
    @SmartColumn(id = 7, name = "电汇费")
    var wireTransferFee: Double = 0.0,
    @SmartColumn(id = 8, name = "合计")
    var totalFee: Double = 0.0
) : Serializable

/**
 * 出库信息
 */
data class ShipmentBean(
    var ID: Int,
    var userId: Int,
    var customerId: Int,
    var productId: Int,
    var purchaseProductId: Int,
    var inventoryId: Int,
    var date: String,
    var customerName: String,
    var area: String,
    var type: String,
    var car: String,
    var salesNumber: Int,
    var salesWeight: Double,
    var salesPrice: Double,
    var totalPrice: Double,
    var freight: Int,
    var unloadingFee: Int,
    var remark: String?,
    var statementList: List<StatementBean>
) : Serializable

/**
 * 税款
 */

data class TaxFeeBean(
    var ID: Int,
    var date: String,
    var purchaseProductId: Int,
    var dollar: Double,
    var rate: Double,
    var tariff: Double,
    var valueAddedTax: Double,
    var taxDifference: Double,
    var totalFee: Double
) : Serializable


/**
 * 代理
 */
data class PurchaseAgentBean(
    var id: Int = 0,
    var agent: String,
    var advanceInterestRate: Double,
    var accountName: String,
    var accountNumber: String,
    var stockNumber: Int,   // 库存数量
    var salesNumber: Int,   //出库数量
    var divideNumber: Int,  //拆柜数量
    var transportNumber: Int//运输数量
) : Serializable

data class FinancingFeeBean(
    val ID: Int = 0,
    var containerNo: String = "",
    var purchaseProductId: Int = 0,
    var financingType: String = "",
    var financingRate: Double? = 0.0,
    var financingAmount: Double? = 0.0,
    var financingInterest: Double? = 0.0,
    var financingDays: Int? = 0,
    var startDate: String? = "",
    var endDate: String? = ""
) : Serializable

/**
 * 港口基本信息
 */
data class ShippingInfo(
    var ID: Int = 0,
    var purchaseProductId: Int,
    var shipCompany: String,
    var port: String,
    var coldStorage: String?,
    var startDate: String,
    var warehousingDate: String?,
    var arrivalDate: String?,
    var deliveryDate: String?
) : Serializable



